package com.gitee.helioz.openai.api.endpoint.completions;

import com.gitee.helioz.openai.api.dto.completions.CompletionResponse;
import com.gitee.helioz.openai.api.dto.completions.CompletionCreateRequest;

/**
 * 〈文本补全服务〉
 * <p>
 * 文档详见: <a href="https://platform.openai.com/docs/api-reference/completions">openai completions</a>
 * </p>
 *
 * @author <a href="https://gitee.com/helioz">Morning Starr</a>
 */
public interface CompletionService {

    /**
     * 创建文本提示补全请求
     * <pre>
     *     <a href="https://platform.openai.com/docs/api-reference/completions/create">文档</a>
     * </pre>
     *
     * @param createRequest 请求对象
     * @return 响应结果
     */
    CompletionResponse create(CompletionCreateRequest createRequest);
}
